1. Field of the Invention
The present invention relates to a controller for a printer, which is adapted to convert a batch of outline data representative of the outline of a figure such as a character, into a batch of bit map data representative of image dots that fill the interior of the outline of the figure.
2. Discussion of the Related Art
Various methods are available in the field of obtaining bit map data by conversion from original outline data which represent the outline or contour of a character or other figure consisting of straight and/or curved segments. One of these methods is known as a "raster scan" procedure in which the outline of a figure is superimposed on a coordinate system wherein the picture elements are defined by mutually perpendicular x-axis and y-axis pixel lines. Initially, two intersections between a scanning line parallel to the x-axis or y-axis pixel lines and the outline of the figure are obtained. Then, a start point and an end point lying on the scanning line are calculated on the basis of the obtained two intersections, so that image dots are placed on the start and end points and between these start and end points, whereby a line of successive image dots is defined along the scanning line and within the outline of the figure. The scanning line is shifted by an incremental distance corresponding to the size of the picture elements, and the processing steps indicated above are repeated to obtain a next pair of start and end points. The shifting of the scanning line is continued until the entire size of the figure outline is covered by the successive scanning lines. Thus, a batch of bit map data representative of the image dots which fill the entire area within the figure outline is prepared by conversion from the original batch of outline data.
The outlines or contours of figures such as alphabetic letters usually consist of straight segments and curved segments. When the intersections between the scanning line and a curved segment of the outline are obtained, the curved segment is approximated by at least one straight line or segment, usually, a plurality of straight segments. Each of these approximating straight segments is obtained by dividing the curved segment in question into two or more parts, so that each straight segment is a line connecting the opposite ends of the corresponding part of the divided curved segment. The division of the curved segment or sub-division of the parts of the once divided curved segment is continued until the accuracy of approximation of the original curved segment by the straight segments is improved to a desired value, so that a curve defined collectively by the straight segments has a smooth appearance closely approximating the original curved segment of the figure outline as represented by the original outline data of the figure.
In the known printer controllers, the required accuracy of approximation of a curved segment by straight segments is fixed and cannot be changed. Consequently, the required number of straight segments used to approximate a curved segment of a figure outline is fixed depending upon the original curved segment and the fixed accuracy of approximation.
A batch of outline data which represents the straight segments approximating the original outline and which is used to prepare a batch of bit map data will be referred to as approximative outline data. Before a batch of original outline data is converted into a corresponding batch of bit map data, the corresponding batch of approximative outline data is prepared as explained above and temporarily stored in a random-access memory, so that the bit map data are prepared from the stored approximative outline data.
According to the known system, the total number of straight segments approximating the original outline of a figure is extremely large when the original figure outline includes curved segments having a large curvature or many curved segments which define a complicated contour of the outline. Accordingly, the volume of the approximative outline data may exceed the storage capacity of the random-access memory. In some printer controller, the random-access memory has a limited storage area allocated to temporarily store the approximative outline data. Thus, the conventional printer controllers may suffer from a problem that a batch of approximative outline data prepared from a batch of original outline data to generate a batch of bit map data cannot be stored in the appropriate random-access memory, and the bit map data cannot be obtained from the original outline data.